<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="../resources/common.js"></script>
<script src="../resources/picker-common.js"></script>
</head>
<body>
<select id="menu">
  <option id="option1" selected>foo</option>
</select>
<script>
var menuElement = document.getElementById('menu');
var picker;

function openPickerErrorCallback() {
    testFailed('picker didn\'t open')
    finishJSTest();
}

document.getElementById('option1').title = 'bar\nbaz';
openPicker(menu, test1, openPickerErrorCallback);

function test1() {
    picker = internals.pagePopupWindow.global.picker;
    shouldBeEqualToString('picker._selectElement.options[0].title', 'bar\nbaz');
    finishJSTest();
}
</script>
</body>
</html>
